public class AdditionalInfoModel extends HCIModelAdapter implements XMLMapping
AdditionalInfoModel represents an information used as search criteria to find Data.
AdditionalInfoModel is an element of the Data.
It is unique by its name in the Data.
The content of the information is set in the value of the AdditionalInfoModel.
The value can be a string, a date or a number.
The main goal of this element inside the Data is to be used as a search criteria in the Search Operations.
to find Data in the system.
A search criteria is applicable on the name and the value of the AdditionInfoModel.
That's useful for external system.
The AdditionalInfoModel is composed of:
name which identifies an unique additional information inside the Data.description allowing a better understanding about the presence of this additional information inside the Data.The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:complexType name="AdditionalInfoType">
<xs:sequence>
<xs:element name="description" type="DescriptionType" minOccurs="0" maxOccurs="1" />
<xs:choice>
<xs:element ref="string" />
<xs:element ref="date" />
<xs:element ref="number" />
</xs:choice>
</xs:sequence>
<xs:attribute name="name" type="xs:string" />
</xs:complexType>
| Modifier and Type | Field and Description |
|---|---|
static String |
TAG_NAME
The value of that constant is the XML tag name of the
AdditionalInfoModel. |
| Constructor and Description |
|---|
AdditionalInfoModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
Class<?> |
getClass(String nsUri,
String tag,
XMLAttributes atts)
Returns the
Java class for a specified XML tag and its attributes in a namespace. |
Date |
getDateValue()
|
String |
getDescription()
Gets the description of the additional information.
|
String |
getName()
Gets the
name of the additional information defined by the user. |
BigDecimal |
getNumberValue()
|
String |
getStringValue()
|
String |
getTagName()
Gets the XML tag name of the HCI model.
|
ValueType |
getType()
Gets the type of the value.
|
void |
marshalAttributes(XMLOutputter output)
Gives an XML representation of the attributes of an object.
|
void |
marshalChildren(XMLOutputter output)
Gives an XML representation of the child objects of an object.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setDateValue(Date value)
|
void |
setDescription(String description)
Sets the description of the additional information.
|
void |
setName(String name)
Sets the
name of the additional information defined by the user. |
void |
setNumberValue(BigDecimal value)
|
void |
setStringValue(String value)
|
void |
setType(ValueType type)
Sets the type of the value.
|
marshalpublic static final String TAG_NAME
AdditionalInfoModel.public String getName()
name of the additional information defined by the user.
The name is unique within the ChargePlanModel.public void setName(String name)
name of the additional information defined by the user.
The name is unique within the ChargePlanModel.name - the name of the additional information defined by the user.public String getDescription()
ChargePlanModel.public void setDescription(String description)
ChargePlanModel.description - the description of the additional information.public ValueType getType()
null, then the value is null.
When the value is null, then the type isn't necessary null.public void setType(ValueType type)
type,
then the value is set to null.type - the type of the value.public String getStringValue()
String if the type is ValueType.STRING, null otherwise.public void setStringValue(String value)
value - the String valuepublic Date getDateValue()
Date if the type is ValueType.DATE, null otherwise.public void setDateValue(Date value)
value - the Date valuepublic BigDecimal getNumberValue()
BigDecimal if the type is ValueType.NUMBER, null otherwise.public void setNumberValue(BigDecimal value)
value - the BigDecimal valuepublic void addCharacterData(String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void addChild(String tagName, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void marshalAttributes(XMLOutputter output)
IXMLMarshallablemarshalAttributes in interface IXMLMarshallableoutput - The XML output to marshal the object attributes intopublic void marshalChildren(XMLOutputter output)
IXMLMarshallablemarshalChildren in interface IXMLMarshallableoutput - The XML output to marshal the child objects intopublic String getTagName()
ITagNameProvidergetTagName in interface ITagNameProviderpublic Class<?> getClass(String nsUri, String tag, XMLAttributes atts)
XMLMappingJava class for a specified XML tag and its attributes in a namespace.getClass in interface XMLMappingnsUri - The unique resource identifier of the namespace of the XML tagtag - The local part of the XML tagatts - The attributes of the XML tagJava class with a default constructor